package Test;

import java.io.BufferedReader;
import java.io.FileReader;

public class Filereader
{
    public static void main(String[] args){
        BufferedReader br= null;
        try{
            br = new BufferedReader(new FileReader("filename.txt"));

            String line;

            if((line = br.readLine())!=null){
                System.out.println(line);
            }

        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
